package com.office.dates.mapper;

import com.office.dates.domain.Dates;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: 柒月
 * @date: 2025/6/26 下午3:42
 * @version: 1.0
 */
public interface DatesMapper {

    List<Dates> selectDatesToDay(@Param("today") String today, @Param("loginUserId") Long loginUserId);

    @Insert("insert into schedule(title,description,start_time,end_time,user_id,color) " +
            "values (#{title},#{description},#{startTime},#{endTime},#{userId},#{color})")
    void installDate(Dates dates);

    /**
     *
     * @param loginUserId 当前登录用户
     * @return 获取全部的日程信息
     */
    List<Dates> selectDatesAll(Long loginUserId);

    /**
     *
     * @param loginUserId 当前登录用户
     * @return 今天的日程
     */
    List<Dates> selectDatesToTheDay(Long loginUserId);

    /**
     *
     * @param loginUserId 当前登录用户
     * @return 获取当前会议数和总数
     */
    Dates selectDateConut(Long loginUserId);
}
